<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE HTML PUBLIC "" "">
<f:view xmlns="http://www.w3.org/1999/xhtml" xmlns:f="http://java.sun.com/jsf/core"
	xmlns:w="http://www.apusic.com/jsf/widget" xmlns:layout="http://www.apusic.com/jsf/layout"
	xmlns:h="http://java.sun.com/jsf/html" xmlns:ajax="http://www.apusic.com/jsf/ajax"
	renderKitId="AJAX">
	<w:head>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
		<w:stylesheet src="/css/kmp4.css" type="text/css"></w:stylesheet>
		<w:script src="/javascript/k4.js" type="text/javascript" language="UTF-8"></w:script>
		<script>
		 	//<![CDATA[
		 	function closeWindow(){
			detailDialogJsvar.hide();
		  }		
		function gridReload(){
			resourceGridJsvar.reload();
		}
			function freshme(){
	 		var store=resourceGridJsvar.getStore();
			store.reload(store.lastOptions);
	 	}
	 	function clear(){
	 	valueSearchJsvar.setValue('');
	 	displayNameSearchJsvar.setValue('');
	 	modulesSearchJsvar.setValue('');
	 	}	
		     //]]>
		 </script>
	</w:head>
	<w:page title="权限一览">
		<layout:panel border="false" autoHeight="true" autoWidth="true" header="false"
			styleClass="k4-view">
			<layout:panel id="viewtoolbar" border="false" autoHeight="true" autoWidth="true">
				<w:form>
					<w:toolBar>
						<w:button label="新增"
							image="#{facesContext.externalContext.requestContextPath}/images/create.gif"
							id="createResource" immediate="true" />
						<w:button label="修改"
							image="#{facesContext.externalContext.requestContextPath}/images/edit.gif" id="editResource"
							immediate="true" />
						<w:separator />
						<w:button label="取消" id="addCancel" immediate="true"
							image="#{facesContext.externalContext.requestContextPath}/images/cancel.gif"
							onclick="javascript:closeCenterLayoutActiveTab()" />
					</w:toolBar>
				</w:form>
			</layout:panel>
			<layout:panel title="搜索条件" border="false" autoHeight="true" autoWidth="true" collapsible="true"
				collapsed="false" styleClass="k4-view-search">
				<w:form clientValidate="true">
					<layout:panelGrid columns="4" styleClass="k4-view-search" cellpadding="0" cellspacing="0"
						border="1">
						<layout:cell styleClass="k4-form-fieldtitle">
							<h:outputLabel value="资源值" for="value" />
						</layout:cell>
						<layout:cell styleClass="k4-form-fieldvalue">
							<w:textField styleClass="k4-form-textfield" id="valueSearch" msgTarget="under"
								jsvar="valueSearchJsvar"></w:textField>
						</layout:cell>
						<layout:cell styleClass="k4-form-fieldtitle">
							<h:outputLabel value="资源名称" for="displayName" />
						</layout:cell>
						<layout:cell styleClass="k4-form-fieldvalue">
							<w:textField styleClass="k4-form-textfield" id="displayNameSearch"
								jsvar="displayNameSearchJsvar"></w:textField>
						</layout:cell>
						<layout:cell styleClass="k4-form-fieldtitle">
							<h:outputLabel value="所属模块" for="nameSearch" />
						</layout:cell>
						<layout:cell styleClass="k4-form-fieldvalue">
							<w:textField styleClass="k4-form-textfield" id="modulesSearch" jsvar="modulesSearchJsvar"></w:textField>
						</layout:cell>
						<layout:cell colspan="2" styleClass="k4-form-fieldvalue">
							<layout:panelGrid columns="2" cellpadding="0" cellspacing="0">
								<w:button id="query" value="搜索"
									image="#{facesContext.externalContext.requestContextPath}/images/search.gif" />
								<w:button id="reset" value="重置"
									image="#{facesContext.externalContext.requestContextPath}/images/clear.gif"
									immediate="true" onclick="clear();" />
							</layout:panelGrid>
						</layout:cell>
					</layout:panelGrid>
				</w:form>
			</layout:panel>
			<w:dataGrid id="resourceGrid" jsvar="resourceGridJsvar" toolBarPosition="bottom" rows="20"
				paged="true" border="false" showRowNumber="true" styleClass="k4-view-datagrid" autoHeight="true">
				<w:outputColumn id="displayName" header="资源名称" width="150"></w:outputColumn>
				<w:outputColumn id="value" header="资源值" width="250" wrap="true"></w:outputColumn>
				<w:outputColumn id="code" header="资源代码" width="130" wrap="true"></w:outputColumn>
				<w:outputColumn id="type" header="资源类型" width="80"></w:outputColumn>
				<w:outputColumn id="description" header="资源描述" width="150" wrap="true"></w:outputColumn>
				<w:outputColumn id="module" header="所属模块" width="80"></w:outputColumn>
				<w:pagingToolbar for="resourceGrid" displayInfo="true" displayMsg="显示 {0} - {1}，共 {2} 条" />
			</w:dataGrid>
		</layout:panel>
		<layout:window width="450" height="330" modal="true" collapsible="false" resizable="true"
			show="false" id="detailDialog" jsvar="detailDialogJsvar" border="true" y="100" x="150">
			<w:iframe id="frame" style="width: 100%;height: 100%" frameborder="no" />
		</layout:window>
	</w:page>
</f:view>